<!--
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-07-24 18:06:11
 * @LastEditTime: 2019-08-15 15:28:27
 * @LastEditors: Please set LastEditors
 -->
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
	<f:layout name="Default" />

	This Template is responsible for creating a table of domain objects.

	If you modify this template, do not forget to change the overwrite settings
	in /Configuration/ExtensionBuilder/settings.yaml:
	  Resources:
		Private:
		  Templates:
			List.html: keep

	Otherwise your changes will be overwritten the next time you save the extension in the extension builder

	<f:section name="content">
		<div class="portlet light ">
		    <div class="portlet-title">
		        <div class="caption">
		            <f:link.action action="new" class="btn btn-info">新增</f:link.action>
		        </div>
		        <div class="actions">
		            <div class="btn-group btn-group-devided">
		                <f:form action="list" name="search" class="form-inline" method="GET">
		                    <div class="input-group">
		                        <div class="input-icon">
		                            <input type="hidden" name="id" value="{pageUid}" />
		                            <i class="fa fa-search"></i>
		                            <f:form.textfield name="keyword" value="{keyword}" class="form-control" placeholder="请输入查询条件"/>
		                        </div>
		                        <span class="input-group-btn">
		                            <f:form.submit class="btn btn-success" value="搜" />
		                        </span>
		                    </div>
		                </f:form>
		            </div>
		        </div>
			</div>
		    <f:widget.paginate objects="{timelines}" as="timelinesPagination"  configuration="{settings.paginate}">
			    <div class="portlet-body">
			        <div class="table-scrollable">
			            <table class="table table-hover table-light">
			                <thead>
			                    <tr class="uppercase">
			                        <th></th>
			                        <th>序号</th>
			                        <th>标题</th>
			                        <th>事件时间</th>
			                        <th>添加时间</th>
			                        <th>事件内容</th>
			                        <th>操作</th>
			                    </tr>
			                </thead>
			                <tbody>
			                    <f:for each="{timelinesPagination}" as="timeline" iteration="item">
			                    <tr>
			                        <td>
			                            <label class="mt-checkbox mt-checkbox-outline">
			                                <input type="checkbox" value="{timeline.uid}" name="test" class="normal sel" />
			                                <span></span>
			                            </label>
			                        </td>
			                        <td>
			                            {f:cObject(typoscriptObjectPath:'lib.calc', data:'{item.cycle}+({page}-1)*{settings.paginate.itemsPerPage}')}
			                        </td>
			                        <td>
			                            <f:link.action action="show" arguments="{timeline : timeline}" >{timeline.title}</f:link.action>
			                        </td>
			                        <td>
			                            {timeline.eventdate -> f:format.date(format:'Y-m-d')}
			                        </td>
			                        <td>
			                            {timeline.crdate -> f:format.date(format:'Y-m-d H:i')}
			                        </td>
			                        <td>
			                            <f:format.crop maxCharacters="9" append="..."><f:format.raw><f:format.stripTags>{timeline.bodytext}</f:format.stripTags></f:format.raw></f:format.crop>
			                        </td>
			                        <td>
										<!-- <f:link.action action="edit" additionalParams="{old_trans_id:timeline.uid,lang:'1',pageid:92}" controller="Trans" extensionName="translation" pluginName="pi1" pageUid="129" noCache="1" noCacheHash="1" class="btn btn-success btn-xs">翻译</f:link.action> -->
			                            <f:link.action action="edit" arguments="{timeline : timeline}" class="btn btn-info btn-xs edit">编辑</f:link.action>
			                            <f:link.action action="delete" arguments="{timeline : timeline}" class="btn btn-danger btn-xs delete btn-del">删除</f:link.action>
			                        </td>
			                    </tr>
			                    </f:for>
			                    <tr>
			                        <td>
			                            <label class="mt-checkbox mt-checkbox-outline">
			                                <input type="checkbox" name="test" class="normal selectall" />
			                                <span></span>
			                            </label>
			                        </td>
			                        <td colspan="6">
			                            <f:form action="multedelete" name="datas">
			                                <f:form.hidden id="multidelete-items" property="items" value=""/>
			                                <f:form.submit value="删除选中" class="btn btn-danger btn-xs delete btn-del btn-delete-all"/>
			                            </f:form>
			                        </td>
			                    </tr>
			                </tbody>
			            </table>
			        </div>
			    </div>
			</f:widget.paginate>
		</div>
		<f:flashMessages />
	</f:section>
</html>